<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>学生仪表盘</title>
    <link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
            background: linear-gradient(135deg, #0a2540 0%, #134790 50%, #1e5a9e 100%);
            min-height: 100vh;
            color: #333;
            position: relative;
            overflow-x: hidden;
        }

        /* 动态背景光效 */
        body::before {
            content: '';
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: 
                radial-gradient(circle at 20% 80%, rgba(19, 71, 144, 0.3) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(30, 90, 158, 0.3) 0%, transparent 50%),
                radial-gradient(circle at 40% 40%, rgba(19, 71, 144, 0.2) 0%, transparent 50%);
            pointer-events: none;
            z-index: 1;
            animation: floatingLight 20s ease-in-out infinite;
        }

        @keyframes floatingLight {
            0%, 100% { transform: translate(0, 0) scale(1); }
            33% { transform: translate(30px, -30px) scale(1.1); }
            66% { transform: translate(-20px, 20px) scale(0.9); }
        }

        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 60px 20px;
            position: relative;
            z-index: 2;
            display: flex;
            flex-direction: column;
            align-items: center;
            min-height: 100vh;
        }

        /* 欢迎标题 */
        h1 {
            color: #fff;
            font-size: 3rem;
            font-weight: 600;
            margin-bottom: 50px;
            text-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
            letter-spacing: -0.5px;
            text-align: center;
            animation: fadeInDown 0.8s ease-out;
        }

        /* 用户信息卡片 */
        .user-info {
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(20px);
            border-radius: 24px;
            padding: 40px;
            width: 100%;
            max-width: 800px;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
            border: 1px solid rgba(255, 255, 255, 0.3);
            animation: fadeInUp 0.8s ease-out 0.2s both;
            position: relative;
            overflow: hidden;
        }

        /* 卡片内部装饰性渐变 */
        .user-info::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 4px;
            background: linear-gradient(90deg, #134790, #1e5a9e, #134790);
            background-size: 200% 100%;
            animation: gradientFlow 3s linear infinite;
        }

        @keyframes gradientFlow {
            0% { background-position: 0% 50%; }
            100% { background-position: 200% 50%; }
        }

        .user-info h2 {
            color: #134790;
            font-size: 1.8rem;
            font-weight: 600;
            margin-bottom: 30px;
            padding-bottom: 15px;
            border-bottom: 2px solid #e8ecf1;
            display: flex;
            align-items: center;
        }

        .user-info h2::before {
            content: '👤';
            margin-right: 12px;
            font-size: 1.6rem;
        }

        .user-info h3 {
            color: #134790;
            font-size: 1.3rem;
            font-weight: 600;
            margin-top: 30px;
            margin-bottom: 20px;
            display: flex;
            align-items: center;
        }

        .user-info h3::before {
            content: '🎓';
            margin-right: 10px;
            font-size: 1.2rem;
        }

        /* 信息项样式 */
        .user-info p {
            color: #4a5568;
            font-size: 1.1rem;
            line-height: 1.8;
            margin-bottom: 15px;
            padding: 12px 20px;
            background: #f8fafb;
            border-radius: 12px;
            transition: all 0.3s ease;
            border-left: 3px solid transparent;
        }

        .user-info p:hover {
            background: #fff;
            border-left-color: #134790;
            transform: translateX(5px);
            box-shadow: 0 4px 12px rgba(19, 71, 144, 0.1);
        }

        .user-info p strong {
            color: #2d3748;
            font-weight: 600;
            margin-right: 10px;
            display: inline-block;
            min-width: 80px;
        }

        /* 课题组列表 */
        .user-info ul {
            list-style: none;
            padding: 0;
            margin: 0;
        }

        .user-info ul li {
            background: linear-gradient(135deg, #f8fafb 0%, #fff 100%);
            border-radius: 12px;
            padding: 16px 24px;
            margin-bottom: 12px;
            color: #4a5568;
            font-size: 1.05rem;
            transition: all 0.3s ease;
            border: 2px solid #e8ecf1;
            position: relative;
            padding-left: 50px;
        }

        .user-info ul li::before {
            content: '📚';
            position: absolute;
            left: 20px;
            top: 50%;
            transform: translateY(-50%);
            font-size: 1.2rem;
        }

        .user-info ul li:hover {
            background: linear-gradient(135deg, #134790 0%, #1e5a9e 100%);
            color: white;
            transform: translateX(8px);
            box-shadow: 0 8px 24px rgba(19, 71, 144, 0.25);
            border-color: transparent;
        }

        /* 无课题组提示 */
        .user-info > p:last-of-type {
            text-align: center;
            color: #9ca3af;
            font-style: italic;
            background: #f3f4f6;
            border-radius: 12px;
            padding: 20px;
            margin-top: 20px;
        }

        /* 操作按钮区域 */
        .actions {
            margin-top: 40px;
            animation: fadeInUp 0.8s ease-out 0.4s both;
        }

        .btn {
            display: inline-block;
            padding: 16px 40px;
            background: linear-gradient(135deg, #134790, #1e5a9e);
            color: white;
            text-decoration: none;
            border-radius: 12px;
            font-size: 1.1rem;
            font-weight: 600;
            transition: all 0.3s ease;
            box-shadow: 0 6px 20px rgba(19, 71, 144, 0.3);
            position: relative;
            overflow: hidden;
        }

        .btn::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
            transition: left 0.5s ease;
        }

        .btn:hover::before {
            left: 100%;
        }

        .btn:hover {
            transform: translateY(-3px);
            box-shadow: 0 10px 30px rgba(19, 71, 144, 0.4);
        }

        .btn:active {
            transform: translateY(-1px);
            box-shadow: 0 4px 15px rgba(19, 71, 144, 0.3);
        }

        /* 额外的操作按钮样式变体 */
        .btn-secondary {
            background: rgba(255, 255, 255, 0.95);
            color: #134790;
            border: 2px solid #134790;
            margin-left: 15px;
        }

        .btn-secondary:hover {
            background: #134790;
            color: white;
        }

        /* 响应式设计 */
        @media (max-width: 768px) {
            h1 {
                font-size: 2.2rem;
                margin-bottom: 30px;
            }

            .container {
                padding: 40px 15px;
            }

            .user-info {
                padding: 30px 20px;
                border-radius: 20px;
            }

            .user-info h2 {
                font-size: 1.5rem;
            }

            .user-info h3 {
                font-size: 1.2rem;
            }

            .user-info p {
                font-size: 1rem;
                padding: 10px 15px;
            }

            .user-info p strong {
                display: block;
                margin-bottom: 5px;
            }

            .btn {
                padding: 14px 30px;
                font-size: 1rem;
                display: block;
                text-align: center;
            }

            .btn-secondary {
                margin-left: 0;
                margin-top: 12px;
            }

            .user-info ul li {
                padding-left: 45px;
                font-size: 0.95rem;
            }
        }

        /* 动画效果 */
        @keyframes fadeInDown {
            from {
                opacity: 0;
                transform: translateY(-30px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(30px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        /* 加载动画 */
        @keyframes pulse {
            0%, 100% {
                opacity: 1;
            }
            50% {
                opacity: 0.5;
            }
        }

        /* 可选：添加装饰性元素 */
        .decoration {
            position: fixed;
            width: 300px;
            height: 300px;
            border-radius: 50%;
            background: radial-gradient(circle, rgba(19, 71, 144, 0.1) 0%, transparent 70%);
            pointer-events: none;
            z-index: 0;
        }

        .decoration-1 {
            top: 10%;
            right: 5%;
            animation: float 15s ease-in-out infinite;
        }

        .decoration-2 {
            bottom: 10%;
            left: 5%;
            animation: float 20s ease-in-out infinite reverse;
        }

        @keyframes float {
            0%, 100% {
                transform: translateY(0) scale(1);
            }
            50% {
                transform: translateY(-20px) scale(1.1);
            }
        }
    </style>
</head>
<body>
    <!-- 装饰性背景元素 -->
    <div class="decoration decoration-1"></div>
    <div class="decoration decoration-2"></div>
    
    <div class="container">
        <h1>欢迎，{{ username }}！</h1>
        
        <div class="user-info">
            <h2>个人信息</h2>
            {% if user_info %}
            <p><strong>姓名:</strong> {{ user_info.full_name }}</p>
            <p><strong>邮箱:</strong> {{ user_info.email }}</p>
            {% endif %}
            
            {% if user_groups %}
            <h3>所属课题组</h3>
            <ul>
                {% for group in user_groups %}
                <li>{{ group }}</li>
                {% endfor %}
            </ul>
            {% else %}
            <p>暂无课题组信息</p>
            {% endif %}
        </div>
        
        <div class="actions">
            <a href="{{ url_for('student_logout') }}" class="btn">退出登录</a>
        </div>
    </div>
</body>
</html>